<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport"
        content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <title><?php echo isset($title) ? $title : env('APP_TITLE'); ?></title>
  <link type="text/css" href="/statics/cz/css/bootstrap.min.css" rel="stylesheet">
  <link type="text/css" href="/statics/cz/css/donation.css" rel="stylesheet">
  <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
  <script src="/statics/cz/layer_mobile/layer.js"></script>
</head>
<body>
	<?php include_once 'accountHeader.php'; ?>
<div class="box">
  <form id="form" action="/alipay/pay" class="form-inline" method="post">
    <ul class='box_' id="box">
      <li data-money="10">10<span>美元</span></li>
      <li data-money="50">50<span>美元</span></li>
      <li data-money="100">100<span>美元</span></li>
      <li data-money="200">200<span>美元</span></li>
    </ul>

    <div class="form-group">
      <div class="input-group">
        <div class="input-group-addon">$</div>
        <input type="number" name='price' class="form-control" id="prices" placeholder="其他" value="10"
               style="   height: 45px;"
               value=''>
        <div class="input-group-addon">美元</div>
      </div>
      <div class="input-group">
        <div style="padding-top: 20px;color: #555555;">
            温馨提示：充值比例 <span style="color: #cc0a01;"> 1 </span>美元 : <span style="color: #cc0a01;">6.8</span>人民币
        </div>
      </div>
    </div>
    <button id="buttona" type="button" style='border:1px solid deepskyblue;background:deepskyblue;' class="btn btn-success">支付宝支付</button>
    <button id="buttonb" type='button' style='border:1px solid cadetblue;background:cadetblue;' class="btn btn-success">银行卡支付</button>
		<button id="buttonc" type='button' style='border:1px solid #5cb85c;' class="btn btn-success">微信支付</button>
		
    <a href="/account/rechargeRecord">
      <button type='button' style='border:1px solid #204d74;' class="btn btn-primary">充值记录</button>
    </a>
    
    <div class="input-group">
        <div style="padding-top: 20px;color: #555555;">
        银行卡充值赠送百分之3（您可以使用手机银行，网银进行转账）每次充值前务必联系在线客服先查看银行卡是否在使用，再进行充值，若入款账户已过期账号，公司无法查收，造成损失恕不负责！
        </div>
      </div>
  </form>
</div>
<script>
  window.onload = function () {
    //初始化赋值
    var buttona = document.getElementById('buttona');
     var buttonb = document.getElementById('buttonb');
     var buttonc = document.getElementById('buttonc');
    var port = document.getElementById('form');
    var sum = document.getElementById('box').getElementsByTagName('li');
    var dex = 0;
    value = ""//dex记录点击；；；value上传的值
		
		
    function bb() {
      sum[dex].style.border = '2px solid #0a9cff';
      sum[dex].style.background = "url(/statics/cz/images/_03.gif) no-repeat right top";
    }

    bb();

    //点击选中
    for (var i = 0; i < sum.length; i++) {
      sum[i].dex = i;
      sum[i].onclick = function () {
        dex = this.dex;
        aa();
        bb();
      };
    }
    //还原默认值
    function aa() {
      for (var j = 0; j < sum.length; j++) {
        sum[j].style.background = "";
        sum[j].style.border = '2px solid #b6bdc5';
      }
    }

    //手动输入判断
    var inputs = document.getElementById('prices');
    inputs.onfocus = function () {
      aa();
      this.style.focus = 'none';
    }
		
		//选择金额
		$("#box li").click(function(){
			var $this=$(this);
			var money=$this.attr("data-money");
			$("#prices").val(money);
		})
		
    $("#prices").blur(function () {
      aa();
      /* if (inputs.value != parseFloat(inputs.value) && inputs.value.length != 0) {
        inputs.value = '';
        layer.open({
          content: '请输入正确格式的价格'
          , skin: 'msg'
          , time: 2 //2秒后自动关闭
        });
      } */
      value = inputs.value;
    });
    //提交
      buttona.onclick = function () {
          layer.open({
              content: '请联系在线客服充值或联系微信QQ客服'
              , skin: 'msg'
              , time: 2 //2秒后自动关闭
          });
      }
    buttonb.onclick = function () {
			layer.open({
			  content: '请联系在线客服充值或联系微信QQ客服'
			  , skin: 'msg'
			  , time: 2 //2秒后自动关闭
			});
    }
    
    buttonc.onclick = function () {
      layer.open({
        content: '请联系在线客服充值或联系微信QQ客服'
        , skin: 'msg'
        , time: 2 //2秒后自动关闭
      });
    }
    
    
  }
</script>
</body>
</html>